<template>
  <div class="app-container jsbos-flex-main systemConfig">
    <el-tabs
      v-model="activeName"
      type="border-card"
      class="jsbos-el_tabs"
      v-loading="sysConfigLoading"
    >
      <el-tab-pane label="账户密码审计" name="first">
        <Account ref="AccountRef"></Account>
      </el-tab-pane>
      <el-tab-pane label="菜单权限审计" name="second">
        <Menu ref="MenuRef"></Menu>
      </el-tab-pane>
      <el-tab-pane label="用户权限审计" name="third">
        <BaseUser ref="BaseUserRef"></BaseUser>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import BaseUser from "@/views/system/audit/user/index.vue";
import Account from "@/views/system/audit/account/index.vue";
import Menu from "@/views/system/audit/menu/index.vue";
export default {
  components: {
    BaseUser,
    Menu,
    Account,
  },
  data() {
    return {
      sysConfigLoading: false,
      showExternalSetting: false,
      activeName: "first",
      baseForm: {},
    };
  },
  watch: {
    activeName(val) {
      if (val === "second") {
        this.$refs.MenuRef;
      }
      if (val === "third") {
        this.$refs.BaseUserRef.initData();
      }
    },
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      this.$nextTick(() => {
        this.$refs.AccountRef.getOrganizeList();
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.systemConfig {
  padding: 0;
}
</style>
